package com.woniuxy.microcommonserver.bean.coupon_pzc;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.woniuxy.microcommonserver.bean.gy.BrandInfo;
import com.woniuxy.microcommonserver.bean.gy.GoodCategoryInfo1;
import com.woniuxy.microcommonserver.bean.gy.GoodCategoryInfo2;
import com.woniuxy.microcommonserver.bean.gy.GoodsInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.NumberFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class CouponInfo implements Serializable {

  private Long id;
  private String couponName;
  @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
  private Date startTime;
  @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
  private Date endTime;
  @NumberFormat
  private BigDecimal accessMoney;
  @NumberFormat
  private BigDecimal toBeUseMoney;
  private Long issueNumber;
  private Integer isUse;
  private String explainDesc;
  private String image;
  private Integer storeNum;

  /**
   * 优惠券可用的范围
   * 包括：一级分类、二级分类、品牌、具体的商品
   * 当某个一级分类可用时，一级分类下所包含的所有商品都可用
   */
  private List<GoodCategoryInfo1> categoryList1;
  private List<GoodCategoryInfo2> categoryList2;
  private List<BrandInfo> brands;
  private List<GoodsInfo> goodsList;

  private Integer isDeleted;

}
